package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.OperationRemindMapper;
import com.ruoyi.business.domain.OperationRemind;
import com.ruoyi.business.service.IOperationRemindService;

/**
 * 综合消息提醒Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-16
 */
@Service
public class OperationRemindServiceImpl implements IOperationRemindService 
{
    @Autowired
    private OperationRemindMapper operationRemindMapper;

    /**
     * 查询综合消息提醒
     * 
     * @param remindId 综合消息提醒主键
     * @return 综合消息提醒
     */
    @Override
    public OperationRemind selectOperationRemindByRemindId(Long remindId)
    {
        return operationRemindMapper.selectOperationRemindByRemindId(remindId);
    }

    /**
     * 查询综合消息提醒列表
     * 
     * @param operationRemind 综合消息提醒
     * @return 综合消息提醒
     */
    @Override
    public List<OperationRemind> selectOperationRemindList(OperationRemind operationRemind)
    {
        return operationRemindMapper.selectOperationRemindList(operationRemind);
    }

    /**
     * 新增综合消息提醒
     * 
     * @param operationRemind 综合消息提醒
     * @return 结果
     */
    @Override
    public int insertOperationRemind(OperationRemind operationRemind)
    {
        operationRemind.setCreateTime(DateUtils.getNowDate());
        return operationRemindMapper.insertOperationRemind(operationRemind);
    }

    /**
     * 修改综合消息提醒
     * 
     * @param operationRemind 综合消息提醒
     * @return 结果
     */
    @Override
    public int updateOperationRemind(OperationRemind operationRemind)
    {
        operationRemind.setUpdateTime(DateUtils.getNowDate());
        return operationRemindMapper.updateOperationRemind(operationRemind);
    }

    /**
     * 批量删除综合消息提醒
     * 
     * @param remindIds 需要删除的综合消息提醒主键
     * @return 结果
     */
    @Override
    public int deleteOperationRemindByRemindIds(Long[] remindIds)
    {
        return operationRemindMapper.deleteOperationRemindByRemindIds(remindIds);
    }

    /**
     * 删除综合消息提醒信息
     * 
     * @param remindId 综合消息提醒主键
     * @return 结果
     */
    @Override
    public int deleteOperationRemindByRemindId(Long remindId)
    {
        return operationRemindMapper.deleteOperationRemindByRemindId(remindId);
    }

    /**
     * 删除综合消息提醒信息
     *
     * @param businessId 综合消息提醒主键
     * @return 结果
     */
    @Override
    public int deleteOperationRemindByBusinessId(Long businessId)
    {
        return operationRemindMapper.deleteOperationRemindByBusinessId(businessId);
    }


    @Override
    public int batchOperationRemind(List<OperationRemind> list) {
        return operationRemindMapper.batchOperationRemind(list);
    }
}
